home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15099 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  756 b 

  1. Path: yfn.ysu.edu!bi287
  2. From: bi287@yfn.ysu.edu (Brian T. Richardson)
  3. Newsgroups: comp.lang.c
  4. Subject: printf problems..
  5. Date: 17 Apr 1996 05:08:02 GMT
  6. Organization: St. Elizabeth Hospital, Youngstown, OH
  7. Message-ID: <4l1ubi$c3p@news.ysu.edu>
  8. Reply-To: bi287@yfn.ysu.edu (Brian T. Richardson)
  9. NNTP-Posting-Host: yfn2.ysu.edu
  10.  
  11.  
  12.     I feel really stupid, but I cannot make printf add zeros
  13.     before a floating point number..  
  14.  
  15.     I want it to output '02.11' not '2.11'  
  16.  
  17.     I tried something like printf(temp, "%O2.2f", myvar)
  18.     and other varations and nothing has worked for
  19.     me, I know I'm missing something really obvious..
  20.  
  21. brian, "Born Again Christian Street Gangs hold up people and force them to 
  22.        say the lords prayer at gunpoint!" - The Globe
  23.  
  24.  
  25. -- 
  26.  
  27.